<template>
  <div class="show">
      <div class="toDay">{{date.match_begin_time}}</div>
      <div class="item">
          <div class="itemTop">
            <div class="left">
              <p class="sLogo"><img :src="date.home_crop.crop_logo"/></p>
              <p class="sName">{{date.home_crop.crop_name}}</p>
              <p class="pay" @click="click">上半场让2.5<span>(1.88)</span></p>
              <p class="pay" @click="click">全场让5.5<span>(1.88)</span></p>
            </div>
            <div class="info">
              <p class="sIcon"></p>
              <p class="pay" @click="click">总分大于224.5<span>(1.88)</span></p>
              <p class="pay" @click="click">总分少于224.5<span>(1.88)</span></p>
            </div>
            <div class="right">
              <p class="sLogo"><img :src="date.away_crop.crop_logo"/></p>
              <p class="sName">{{date.away_crop.crop_name}}</p>
              <p class="pay" @click="click">上半场受2.5<span>(1.88)</span></p>
              <p class="pay" @click="click">全场受5.5<span>(1.88)</span></p>
            </div>
          </div>
      </div>
  </div>
</template>

<script>
import {Get,Post,Put,Del} from '@/api/index.js'


export default {
  name: 'HelloWorld',
  data () {
    return {
      date:''
    }
  },

  mounted(){
    this.getData()
  },
  methods:{
    click(){
      this.$store.dispatch('payStart', true)
    },
    async getData(){
        let reg=await Get('/sport/match/1?_include=home_crop,away_crop,sport_match_set',this.$store.state.token)
        console.log(reg)
        this.date=reg.data
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>

</style>
